package User;

import Operation.*;


import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2023-12-31
 * Time: 21:37
 */
public class NormalUser extends User{
    public NormalUser(String name) {
        super(name);
        this.ioPerations = new Operation[]{
                new ExitOperation(),
                new FindOperation(),
                new IsBorrowedOperation(),
                new ReturnOperation()
        };
        /*int[] array = {1,2,3,4};//定义的同时直接赋值 进行初始化
        int[] array2;
        array2 = new int[]{1,2,4,5,};
        */
    }

    @Override
  public   int  menu() {
            System.out.println("*********普通用户界面*********");
        System.out.println("*****1.查找图书******");
        System.out.println("*****2.借阅图书******");
        System.out.println("*****3.归还图书******");
        System.out.println("*****0.退出系统******");
        System.out.println("请输入你的操作:");
        System.out.println("****************************");
        Scanner scanner=new Scanner(System.in);
        int choice=scanner.nextInt();
        return choice;
    }
}
